<template>
	<view class="box">
		<view class="myHead-ico">
			<text @tap="goToBack" class="iconfont icon-fanhui"></text>
			<text @tap="goToHome" class="iconfont icon-zhuye"></text>
		</view>
		<text class="title">{{title}}</text>
	</view>
</template>

<script>
	export default {
		name:"myHead",
		data() {
			return {
			
			}
		},
		props:['title'],
		methods: {
			goToBack() {
				uni.navigateBack();
			},
			goToHome() {
				uni.navigateTo({
					url: '/pages/index/index'
				})
			}
		}
	}
</script>

<style>
	.box {
		padding: 25rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.myHead-ico {
		display: flex;
		align-items: center;
		
	}

	.myHead-ico text:first-child {
		margin-right: auto; /* 将第一个元素推到左侧 */
	}

	.myHead-ico text {
		padding: 0 10px;
		font-size: 40rpx;
	}

	.title {
		text-align: center;
		flex: 1; /* 让标题占据剩余空间居中显示 */
	}
</style>
